import axios from "axios"

let httpRequest=function(method,url,params,data){
    return axios({
        url:url,
        method:method,
        baseURL:"/api",
        headers:{
            "content-type":"application/json"
        },
        param:params,
        data:data,
        timeout:10000
    }).then(response=>{
        return response.data;
    })
}

export default httpRequest